
# set working directory
rm(list=ls())
curcomp <- c("C:/Users/iosgood/Dropbox/wbfg/tww_rep")
setwd(curcomp)

# load libraries
library(mediation)
library(foreign)
library(Hmisc)
library(xtable)
library(mvtnorm)
library(scales)
library(reshape2)
library(RColorBrewer)

sessionInfo()

## self-defined functions
# for rounding
myround <- function(vec, dig){return(formatC(round(as.numeric(as.character(vec)),dig),dig,format="f"))}

# for writing tables
ptable <- function(contents, file){
  print(xtable(contents), type='latex', sanitize.text.function=identity, include.rownames = FALSE, include.colnames = FALSE, 
  file = file, only.contents = TRUE, hline.after = NULL, add.to.row = addtorow)
}

## run data analysis scripts
source("code/yougov experimental analysis R script.R")
source("code/lucid experimental analysis R script.R")
source("code/lucid descriptive analysis R script.R")
source("code/lucid experimental with manipulation check analysis R script.R")
source("code/lucid experimental with control condition analysis R script.R")



